package org.cjlm.muaction.frm;

import org.cjlm.ui.pub.MAbstraction;

import javax.swing.*;
import java.awt.event.ActionEvent;

public class FrameCloseAllAction extends MAbstraction {

    public FrameCloseAllAction(String title){
        super(title);
    }
    @Override
    public void doAction(ActionEvent e) throws Exception {
        for (JInternalFrame frame : getDesktop().getAllFrames())  {
            frame.dispose();
        }
        getFrameRegistry().clear();
    }


}
